{% extends 'SystemAdminBundle:base:main.content.lists.div.html.twig' %}
{% block options %}
    <div class="menu-list">
        {#{{ dump(tools) }}#}
        {% for key , classes in tools %}
            {% set default = "请选择分类" %}
            {% set classes = classes %}
            <div class="rule-single-select">
                <select name="cond[{{ key }}]" onchange="javascript:__doPostBack('searchCond','')" >
                    <option value="" {{app.request.get("cond")[key] is defined and app.request.get("cond")[key] == "" ? ' selected="selected"' : "" }} >{{ default }}</option>
                    {% for class in classes %}
                        <option
                                value="{{ class.id }}"
                                {{app.request.get("cond")[key] is defined and  app.request.get("cond")[key] == class.id ? ' selected="selected"' : "" }}
                                >
                            {{ class.name }}
                        </option>
                    {% endfor %}
                </select>
            </div>
        {% endfor %}
    </div>
{% endblock %}
{% block tableHead %}
    <tr>
        <th width="6%">选择</th>
        <th align="left">课程</th>
        <th align="left">用户</th>
        <th align="left">评论内容</th>
        <th align="left" width="10%">评论时间</th>
        <th align="center" width="5%">管理</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align="center">
                <span class="checkall" style="vertical-align:middle;">
                    <input type="checkbox" name="ids[]" value="{{ Entity.Note_id }}"/>
                </span>
            </td>
            <td align="left">{{ Entity.CourseLessonContent_title }}</td>
            <td align="left">{{ Entity.User_id }}|{{ Entity.User_account }}|{{ Entity.User_nickName }}</td>
            <td align="left">{{ Entity.Note_what }}</td>
            <td align="left">{{ Entity.Note_time | date("Y-m-d H:i:s")  }}</td>
            <td align="center">
                <a href="{{ path("NotePreEdit",{'id':Entity.Note_id}) }}" class="img-btn edit"></a>
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

